import React from 'react';
import './SvgIcon.scss';

interface SvgIconProps {
  name: string;
  width: string;
  height?: string;
  fill?: string;
}

const SvgIcon: React.FunctionComponent<SvgIconProps> = ({ name, width, height, fill }) => {
  return (
    <svg className="icon" aria-hidden="true" width={width} height={height}>
      <use xlinkHref={'#icon-' + name} style={{ color: fill }}></use>
    </svg>
  );
};

export default SvgIcon;